<template>
	<view class="content">
		<uni-list v-for="item,index in list" :key="index">
			<uni-badge :text="item.id" size="small" absolute="rightTop" :offset="[30,30]">
				<uni-list-item :title="item.name" :thumb="'../../static/cat-7.png'" thumbSize="lg"
					:note="item.department" :to='"../classmatedetail/classmatedetail?id="+item.id'>
				</uni-list-item>
			</uni-badge>
		</uni-list>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				"list": [
					
				]
			}
		},
		
		methods: {

		},
		onLoad() {
			uni.request({
				url: 'http://localhost:8090/freshmenapp/user/list',
				method: 'POST',
				data: {},
				success: res => {
					if (res.data.success) {
						this.list = res.data.list
						uni.showToast({
							title: '成功',
							icon: 'none'
						});
					} else {
						uni.showToast({
							title: '失败',
							icon: 'none'
						});
					}
				},
				fail: () => {
					uni.showToast({
						title: '失败',
						icon: 'none'
					});
				},
		
				complete: () => {}
			});
		}
	}
</script>

<style>

</style>